package com.huang.controller;

import com.huang.pojo.Car;
import com.huang.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Component
@RestController
public class CarController {

@Autowired
private CarService service;
@RequestMapping("get")
    public List<Car> get(){

        return service.get();
    }
}
